package com.ktjy.pages;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * 项目分页的实体类
 * @param <T>
 */
public class ProjectPage<T> extends Page<T> {


    private List<T> content;//当前对象的数据集合
    private Long totalElements;//共多少条记录
    private Long number;//当前页码

    private Long totalPages;//共几页

    public Long getTotalElements() {
        return getTotal();
    }

    public void setTotalElements(Long totalElements) {
        this.totalElements = totalElements;
    }

    public Long getNumber() {
        return getCurrent()-1;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public Long getTotalPages() {
        return getPages();
    }

    public void setTotalPages(Long totalPages) {
        this.totalPages = totalPages;
    }

    public List<T> getContent() {
        return getRecords();
    }

    public void setContent(List<T> content) {
        this.content = content;
    }
    @Override
    public String toString() {
        return "ProjectPage{" +
                "content=" + content +
                ", totalElements=" + totalElements +
                ", number=" + number +
                ", totalPages=" + totalPages +
                '}';
    }
}
